import http from '@/utils/httpRequest'
import ApiUrl from '@/utils/api-url'

// eslint-disable-next-line no-unused-vars
let config = {
  headers: {
    'Content-Type': 'multipart/form-data;charset=utf-8'
  },
  transformRequest: [function (data) {
    return data
  }]
}

const userInfoApi = {
  /**
  * 查询所有数据
  */
  queryAll: function () {
    return http({
      baseURL: ApiUrl.API_HOST_BASE,
      url: http.adornUrl('api/system/userInfo/query-all'),
      method: 'post'
    })
  },

  /**
  * 新增
  * @param data
  */
  save: function (data) {
    return http({
      baseURL: ApiUrl.API_HOST_BASE,
      url: http.adornUrl('api/system/userInfo/save'),
      method: 'post',
      data: http.adornData(data)
    })
  },

  /**
  * 删除
  * @param param
  */
  delete: function (param) {
    return http({
      baseURL: ApiUrl.API_HOST_BASE,
      url: http.adornUrl('api/system/userInfo/delete'),
      method: 'post',
      data: http.adornData(param)
    })
  },

}

export default userInfoApi